A ring network technology is a technology in which some network devices are connected to form a ring shape to implement intercommunication, for example, a Layer 2 Ethernet ring network. When data traffic is transmitted through a ring network, the data traffic is usually transmitted by a source node and enters the ring network from a network device (which may be called a ring network node) in the ring network. After being transmitted along a ring network path, the data traffic exits the ring network from another network device and is transmitted to a destination node.
When a certain network device in the ring network fails, the data traffic that flows through the device may be interrupted, so the data traffic transmitted by the source node cannot be transmitted via the original ring network path. At this time, a node in the ring network usually adopts a manner of clearing a media access control (MAC) address and performing MAC address learning again. For example, the data traffic enters the ring network from a first node in the ring network, passes through a second node, reaches an A interface of a third node, and exits the ring network from the third node. The third node may record correspondence between a source MAC address of the data traffic and the A interface, so that when the third node receives traffic to be transmitted to the source MAC address, the third node transmits the traffic through the A interface. When the second node fails, the third node only knows that a failure occurs in the ring network, but does not specifically know the location of the failure in the ring network. If the third node still transmits the traffic through the A interface, a transmission failure may occur. Therefore, when the ring network fails, the third node usually performs broadcast transmission and does not stop broadcasting until the third node receives traffic that flows back to the third node from an opposite direction and determine a path corresponding to the source MAC address along which the traffic can be successfully transmitted, so as to switch the traffic to the new path for transmission. In this manner, efficiency of failure processing in the ring network is rather low. Besides, as the MAC address learning takes a relatively long time, the broadcast traffic is everywhere in the ring network before the third node learns the new MAC address, which greatly increases traffic load pressure on the ring network.